
CFLAGS+= -ansi -fpermissive -Wall -g

all: calendar

clean:
	rm calendar main.o Calendar_t.o Appointment_t.o DayTime_t.o 

calendar: main.o Calendar_t.o Appointment_t.o DayTime_t.o
	g++ -o calendar main.o Calendar_t.o Appointment_t.o DayTime_t.o $(CFLAGS)
	
main.o: main.cpp Calendar_t.cpp Calendar_t.h Appointment_t.cpp Appointment_t.h DayTime_t.cpp DayTime_t.h
	g++ -c main.cpp $(CFLAGS)
	
Calendar_t.o: Calendar_t.cpp Calendar_t.h
	g++ -c Calendar_t.cpp $(CFLAGS)

Appointment_t.o: Appointment_t.cpp Appointment_t.h DayTime_t.h
	g++ -c Appointment_t.cpp $(CFLAGS)

DayTime_t.o: DayTime_t.cpp DayTime_t.h
	g++ -c DayTime_t.cpp $(CFLAGS)
